Visualization of High Dimensional Functions with PCA#

[1]:
from optymus import Optimizer
import jax.numpy as jnp
[2]:
# function with n variables
def f(x):
    return x[0] * jnp.sin(x[1]) + (x[0] + x[2]) * jnp.cos(x[0])

# define the initial point
initial_point = jnp.array([-2.0, 5.0, 1.0])

# define the optimizer
opt = Optimizer(f_obj=f, x0=initial_point, method='gradient_descent')
Gradient Descent 0: 100%|██████████| 100/100 [00:03<00:00, 26.67it/s]
[3]:
opt.plot_results(show=True, notebook=True)